#pragma once
#include "gp_Ax22d.h"
#include "gp_Ax2d.h"
#include "gp_Pnt2d.h"

class gp_Ax2d;
class gp_Ax22d;
class gp_Pnt2d;
class gp_Trsf2d;
class gp_Vec2d;


 

//! Describes a parabola in the plane (2D space). <br>
//! A parabola is defined by its focal length (that is, the <br>
//! distance between its focus and apex) and positioned in <br>
//! the plane with a coordinate system (a gp_Ax22d object) where: <br>
//! -   the origin of the coordinate system is on the apex of <br>
//!   the parabola, and <br>
//! -   the "X Axis" of the coordinate system is the axis of <br>
//!   symmetry; the parabola is on the positive side of this axis. <br>
//! This coordinate system is the "local coordinate system" <br>
//! of the parabola. Its orientation (direct or indirect sense) <br>
//! gives an implicit orientation to the parabola. <br>
//! In this coordinate system, the equation for the parabola is: <br>
//! Y**2 = (2*P) * X. <br>
//! where P, referred to as the parameter of the parabola, is <br>
//! the distance between the focus and the directrix (P is <br>
//! twice the focal length). <br>
//! See Also <br>
//! GCE2d_MakeParab2d which provides functions for <br>
//! more complex parabola constructions <br>
//! Geom2d_Parabola which provides additional functions <br>
//! for constructing parabolas and works, in particular, with <br>
//! the parametric equations of parabolas <br>
class gp_Parab2d  {

public:

  

  //! Creates an indefinite parabola. <br>
      gp_Parab2d();
  
//!  Creates a parabola with its vertex point, its axis of symmetry <br>
//!  ("XAxis") and its focal length. <br>
//!  The sense of parametrization is given by Sense. <br>
//!  Warnings : It is possible to have Focal = 0. <br>
//! Raises ConstructionError if Focal < 0.0 <br>
      gp_Parab2d(const gp_Ax2d& MirrorAxis,const double Focal,const bool Sense = true);
  
//!  Creates a parabola with its vertex point, its axis of symmetry <br>
//!  ("XAxis") and its focal length. <br>
//!  The sense of parametrization is given by A. <br>
//! Warnings : It is possible to have Focal = 0. <br>
//! Raises ConstructionError if Focal < 0.0 <br>
      gp_Parab2d(const gp_Ax22d& A,const double Focal);
  
//!  Creates a parabola with the directrix and the focus point. <br>
//!  The sense of parametrization is given by Sense. <br>
     gp_Parab2d(const gp_Ax2d& D,const gp_Pnt2d& F,const bool Sense = true);
  
//!  Creates a parabola with the directrix and the focus point. <br>
//!  The Sense of parametrization is given by D. <br>
     gp_Parab2d(const gp_Ax22d& D,const gp_Pnt2d& F);
  
//!  Changes the focal distance of the parabola <br>
//! Warnings : It is possible to have Focal = 0. <br>
//! Raises ConstructionError if Focal < 0.0 <br>
        void SetFocal(const double Focal) ;
  
//!  Changes the "Location" point of the parabola. It is the <br>
//!  vertex of the parabola. <br>
        void SetLocation(const gp_Pnt2d& P) ;
  //! Modifies this parabola, by redefining its local coordinate system so that <br>
//!    its origin and "X Direction" become those of the axis <br>
//!  MA. The "Y Direction" of the local coordinate system is <br>
//!   then recomputed. The orientation of the local <br>
//!   coordinate system is not modified. <br>
        void SetMirrorAxis(const gp_Ax2d& A) ;
  
//!  Changes the local coordinate system of the parabola. <br>
//!  The "Location" point of A becomes the vertex of the parabola. <br>
        void SetAxis(const gp_Ax22d& A) ;
  
//!  Computes the coefficients of the implicit equation of the parabola. <br>
//!  A * (X**2) + B * (Y**2) + 2*C*(X*Y) + 2*D*X + 2*E*Y + F = 0. <br>
       void Coefficients(double& A,double& B,double& C,double& D,double& E,double& F) const;
  
//!  Computes the directrix of the parabola. <br>
//! The directrix is: <br>
//! -   a line parallel to the "Y Direction" of the local <br>
//!   coordinate system of this parabola, and <br>
//! -   located on the negative side of the axis of symmetry, <br>
//!   at a distance from the apex which is equal to the focal  length of this parabola. <br>
//!   The directrix is returned as an axis (a gp_Ax2d object), <br>
//! the origin of which is situated on the "X Axis" of this parabola. <br>
        gp_Ax2d Directrix() const;
  
//!  Returns the distance between the vertex and the focus <br>
//!  of the parabola. <br>
        double Focal() const;
  //! Returns the focus of the parabola. <br>
        gp_Pnt2d Focus() const;
  //! Returns the vertex of the parabola. <br>
        gp_Pnt2d Location() const;
  
//!  Returns the symmetry axis of the parabola. <br>
//!  The "Location" point of this axis is the vertex of the parabola. <br>
        gp_Ax2d MirrorAxis() const;
  
//!  Returns the local coordinate system of the parabola. <br>
//!  The "Location" point of this axis is the vertex of the parabola. <br>
        gp_Ax22d Axis() const;
  
//!  Returns the distance between the focus and the <br>
//!  directrix of the parabola. <br>
        double Parameter() const;
  
        void Reverse() ;
  
//! Reverses the orientation of the local coordinate system <br>
//! of this parabola (the "Y Direction" is reversed). <br>
//! Therefore, the implicit orientation of this parabola is reversed. <br>
//! Note: <br>
//! -   Reverse assigns the result to this parabola, while <br>
//! -   Reversed creates a new one. <br>
        gp_Parab2d Reversed() const;
  //! Returns true if the local coordinate system is direct <br>
//!            and false in the other case. <br>
        bool IsDirect() const;
  
       void Mirror(const gp_Pnt2d& P) ;
  
//!  Performs the symmetrical transformation of a parabola with respect <br>
//!  to the point P which is the center of the symmetry <br>
       gp_Parab2d Mirrored(const gp_Pnt2d& P) const;
  
       void Mirror(const gp_Ax2d& A) ;
  
//!  Performs the symmetrical transformation of a parabola with respect <br>
//!  to an axis placement which is the axis of the symmetry. <br>
       gp_Parab2d Mirrored(const gp_Ax2d& A) const;
  
        void Rotate(const gp_Pnt2d& P,const double Ang) ;
  
//!  Rotates a parabola. P is the center of the rotation. <br>
//!  Ang is the angular value of the rotation in radians. <br>
        gp_Parab2d Rotated(const gp_Pnt2d& P,const double Ang) const;
  
        void Scale(const gp_Pnt2d& P,const double S) ;
  
//!  Scales a parabola. S is the scaling value. <br>
//!  If S is negative the direction of the symmetry axis <br>
//!  "XAxis" is reversed and the direction of the "YAxis" too. <br>
        gp_Parab2d Scaled(const gp_Pnt2d& P,const double S) const;
  
        void Transform(const gp_Trsf2d& T) ;
  
//!  Transforms an parabola with the transformation T from class Trsf2d. <br>
        gp_Parab2d Transformed(const gp_Trsf2d& T) const;
  
        void Translate(const gp_Vec2d& V) ;
  
//!  Translates a parabola in the direction of the vector V. <br>
//!  The magnitude of the translation is the vector's magnitude. <br>
        gp_Parab2d Translated(const gp_Vec2d& V) const;
  
        void Translate(const gp_Pnt2d& P1,const gp_Pnt2d& P2) ;
  
//!  Translates a parabola from the point P1 to the point P2. <br>
        gp_Parab2d Translated(const gp_Pnt2d& P1,const gp_Pnt2d& P2) const;
    const gp_Ax22d& _CSFDB_Getgp_Parab2dpos() const { return pos; }
    double _CSFDB_Getgp_Parab2dfocalLength() const { return focalLength; }
    void _CSFDB_Setgp_Parab2dfocalLength(const double p) { focalLength = p; }



protected:




private: 


gp_Ax22d pos;
double focalLength;


};






// other  functions and methods (like "C++: function call" methods)



